<template>
  <div>

    <el-row>
      <el-button @click="handleChangView('Tj')" type="primary" round>推荐</el-button>
      <el-button @click="handleChangView('Dy')" type="primary" round>电影</el-button>
      <el-button @click="handleChangView('Dsj')" type="primary" round>电视剧</el-button>
      <el-button @click="handleChangView('Zy')" type="primary" round>综艺</el-button>
      <el-button @click="handleChangView('Et')" type="primary" round>儿童</el-button>
      <el-button @click="handleChangView('Dm')" type="primary" round>动漫</el-button>
      <el-button @click="handleChangView('Ty')" type="primary" round>体育</el-button>
      <el-button @click="handleChangView('Jlp')" type="primary" round>纪录片</el-button>
    </el-row>
    <hr>
    <component :is="currentView"></component>
    <!-- <router-view></router-view> -->


  </div>
</template>

<script>
  import videoTj from './videoTj'
  import videoDsj from './videoDsj'
  import videoDm from './videoDm'
  import videoDy from './videoDy'
  import videoEt from './videoEt'
  import videoJlp from './videoJlp'
  import videoTy from './videoTy'
  import videoZy from './videoZy'
  export default {
    name: 'post',
    data() {
      return {
        currentView: 'videoTj'
      }
    },
    methods: {
      handleChangView(component) {
        this.currentView = 'video' + component;
        console.log(this.currentView);
      }
    },
    components: {
      videoTj,
      videoDsj,
      videoDm,
      videoDy,
      videoEt,
      videoJlp,
      videoTy,
      videoZy,
    },


  }
</script>

<style scoped>
  button {
    width: 160px;
  }
</style>